/**
 * @author bipul_sinha
 * @version 1.0
 * @created 10th November, 2010.
 *
 * AbstractMasterEntity
 *
 * Copyright @ 2010 by 
 * All Rights Reserved.
 * CONFIDENTIAL AND TRADE SECRET
 */
package com.ces.knacky.framework.model;

import com.ces.knacky.model.Flag;
 
/**
 * This class provides a contract to have features of ITimestampable, IUpdatable and IFlaggable. 
 * Thus, it provides contract for the changes made, when the changes are made and who has made
 * the changes.
 *   
 * @author bipul_sinha
 * @see AbsractEntity
 * @see IFlaggable
 *
 */
public abstract class AbstractMasterEntity extends AbstractEntity implements IFlaggable {

	/**
	 * Represents Flag of the current persistent object. It returns the current state of entity
	 * in terms of logging i.e Active, Inactive or Deleted.
	 */
	protected Flag flag;

	/**
     * This method provides a contract to use flags to represent different states of persistent 
     * object on the basis of the logging mechanism. It returns the current flagId value of the
     * persistent object.  
     * 
     * @return 	Integer
     * 			Represents flag of the current persistent object.	
     */
	public Flag getFlag() {
		return flag;
	}
	 /**
     * This method provides a contract to use flags to represent different states of persistent 
     * object on the basis of the logging mechanism. It is used to change/set the current flagId 
     * value of the persistent object.  
     * 
     * @return 	Integer
     * 			Represents flag of the current persistent object.	
     */
	public void setFlag(Flag flag) {
		this.flag = flag;
	}
}

